<div class="afiliados form">
<?php echo $this->Form->create('Afiliado', array(
    'url' => array_merge(array('action' => 'find'), $this->params['pass'])
));?>
	<fieldset>
		<legend><?php echo __('Buscar Afiliado'); ?></legend>
	<?php
		echo $this->Form->input('dni');
	?>
	</fieldset>
<?php echo $this->Form->submit(__('Buscar'), array('div' => false)); 
echo $this->Form->end(); ?>
<br>
  <h2><?php echo __('Resultados:'); ?></h2>
  <table cellpadding="0" cellspacing="0">
    <tr>
      <th><?php echo $this->Paginator->sort('dni'); ?></th>
      <th><?php echo $this->Paginator->sort('nombre'); ?></th>
      <th><?php echo $this->Paginator->sort('apellidos'); ?></th>
      <th><?php echo $this->Paginator->sort('email'); ?></th>
      <th><?php echo $this->Paginator->sort('telefono'); ?></th>
      <th class="actions"><?php echo __('Acciones'); ?></th>
    </tr>
    <?php foreach ($afiliados as $afiliado): ?>
      <tr>
        <td><?php echo h($afiliado['Afiliado']['dni']); ?>&nbsp;</td>
        <td><?php echo h($afiliado['Afiliado']['nombre']); ?>&nbsp;</td>
        <td><?php echo h($afiliado['Afiliado']['apellidos']); ?>&nbsp;</td>
   		<td><?php echo h($afiliado['Afiliado']['email']); ?>&nbsp;</td>
		<td><?php echo h($afiliado['Afiliado']['telefono']); ?>&nbsp;</td>
        <td class="actions">
          <?php echo $this->Html->link(__('Ver'), array('action' => 'view', $afiliado['Afiliado']['id'])); ?>
          <?php echo $this->Html->link(__('Editar'), array('action' => 'edit', $afiliado['Afiliado']['id'])); ?>
          <?php echo $this->Form->postLink(__('Borrar'), array('action' => 'delete', $afiliado['Afiliado']['id']), null, __('Esta seguro que desea borrar este afiliado # %s?', $afiliado['Afiliado']['nombre']." ".$afiliado['Afiliado']['apellidos'])); ?>
        </td>
      </tr>
    <?php endforeach; ?>
  </table>
  <p>
    <?php
    echo $this->Paginator->counter(array(
        'format' => __('Pagina {:page} de {:pages}, mostrando {:current} registros de un total de {:count}, comenzando en el registro {:start}, terminando en {:end}')
    ));
    ?>
  </p>

  <div class="paging">
    <?php
    echo $this->Paginator->prev('< ' . __('previous'), array(), null, array('class' => 'prev disabled'));
    echo $this->Paginator->numbers(array('separator' => ''));
    echo $this->Paginator->next(__('next') . ' >', array(), null, array('class' => 'next disabled'));
    ?>
  </div>
</div>

<div class="actions">
	<h3><?php echo __('Acciones'); ?></h3>
	<ul>

		<li><?php echo $this->Form->postLink(__('Borrar'), array('action' => 'delete', $this->Form->value('afiliado.id')), null, __('Esta seguro que desea borrarlo # %s?', $this->Form->value('Afiliado.id'))); ?></li>
		<li><?php echo $this->Html->link(__('Ver Afiliados'), array('action' => 'index'));?></li>
		</ul>
</div>

